#ifndef VARWIDGET_H
#define VARWIDGET_H


#include<QtXml>
#include<QVector>
#include<QDialog>

class QTableWidget;
class QPushButton;

class varDialog : public QDialog
{
    Q_OBJECT

public:
    varDialog(QDomDocument &rootNode, QWidget *parent = 0);
public slots:
    void addRow();
    void remRow();
    void copyRow();

    void readAddedRow();
    void changeTable();
signals:
    void rowChangeAdd(int);
    void rowChangeRem(int);
private:
    QDomElement mainNode;
    QVector <QDomAttr*> vect;
    void fillVect();

    int atrs;
    QTableWidget* createTable();
    QTableWidget *table;

private:
    QPushButton *addButton;
    QPushButton *remButton;
    QPushButton *copyButton;

};
#endif // VARWIDGET_H
